import React from 'react';

const Title = ({ msg, children }) => {
    const getMsg = () => {
        if (msg) {
            return <div className="text-lg mr-4">{msg}</div>;
        }

        return null;
    };
    return (
        <div className="bg-title flex my-2">
            <div className="inline-flex px-4 py-2 items-center">
                {getMsg()}
                {children}
            </div>
        </div>
    );
};

export {Title};
